package acm.pta;

import java.util.Scanner;

public class E {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n = sc.nextInt();
        int res=0;
        int num=1;
        for (int i = 1; i <= n; i++) {
            num*=i;
            res+=num;
        }
        System.out.println(res);
    }
}
